/**
 * ajax设置。用于ajax预处理和处理完成后事件。场景：验证用户登录等
 */
$.ajaxSetup({
    beforeSend:function(XMLHttpRequest){
    	// alert("ajax请求之前");
    }, 
    afterSend:function(xhr,data) {
    }, 
    complete:function(xhr,data) {
    	var Authorized = xhr.getResponseHeader('Authorized');
    	if(Authorized && Authorized == "false"){
    		alert("您未登录，或者已经过期，请从新登录！");
    		//xhr.abort();
    		window.location.href=(path || '' )+"/user/login?referer="+window.location.pathname.replace(path+"/", "/");
    	}
    }
});